Page({
  onLoad () {
    this.getVistorList()
  },
  // 访客列表接口
  async getVistorList () {
    const { code, data: { rows: visitorList } } = await wx.http.get('/visitor')
    if (code !== 10000) return wx.utils.toast('获取访客列表失败')
    this.setData({
      visitorList
    })
  },
  goPassport (e) {
    wx.navigateTo({
      url: '/visitor_pkg/pages/passport/index?id=' + e.mark.id,
    })
  },
})
